package com.thinkgem.jeesite.modules.record.web;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.thinkgem.jeesite.common.persistence.Page;
import com.thinkgem.jeesite.common.web.BaseController;
import com.thinkgem.jeesite.modules.record.entity.Record;
import com.thinkgem.jeesite.modules.record.service.RecordService;

@Controller
@RequestMapping(value="${adminPath}/record")
public class RecordController extends BaseController{

	@Autowired
	RecordService recordService;
	/**
	 * 查找所有的缴费记录
	 * */
	@RequestMapping(value="/recordList")
	public String recordList(HttpServletRequest request,HttpServletResponse response,Model model){
		Page<Record> page = recordService.findPage(new Page<Record>(request,response), new Record());
		model.addAttribute("page", page);
		return "modules/record/recordList";
	}
	/**
	 * 查找我的缴费记录
	 * */
	@RequestMapping(value="/MyrecordList")
	public String MyrecordList(HttpServletRequest request,HttpServletResponse response,Model model){
		Page<Record> page = recordService.findMyList(new Page<Record>(request,response), new Record());
		model.addAttribute("page", page);
		return "modules/record/MyrecordList";
	}
}
